<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="com.tz.hospital.entity.*, java.util.List ,com.tz.hospital.mapper.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<!-- 引入 layui.css -->
<link rel="stylesheet" href="/hospital_system/layui-v2.6.8/layui/css/layui.css"/>
<!-- 引入 layui.js -->
<script src="/hospital_system/layui-v2.6.8/layui/layui.js"></script>
</head>
<body>
<table class="layui-table"  style="background-color:transparent; border:0px; ">
        <tr>
       <%registermapper rt=new registermapper(); %>
       
           <td><%if(rt.getWeekOfDate().equals("1")){ %>
          	 今天
          	 <%}else if(rt.getWeekOfDate().equals("7")){ %>
          	 明天
          	 <%}else{ %>
          	 周一
          	 <%} %></td>
           <td><%if(rt.getWeekOfDate().equals("2")){ %>
          	 今天
          	 <%}else if(rt.getWeekOfDate().equals("1")){ %>
          	 明天
          	 <%}else{ %>
          	 周二
          	 <%} %></td>
           <td><%if(rt.getWeekOfDate().equals("3")){ %>
          	 今天
          	 <%}else if(rt.getWeekOfDate().equals("2")){ %>
          	 明天
          	 <%}else{ %>
          	 周三
          	 <%} %></td>
           <td><%if(rt.getWeekOfDate().equals("4")){ %>
          	 今天
          	 <%}else if(rt.getWeekOfDate().equals("3")){ %>
          	 明天
          	 <%}else{ %>
          	 周四
          	 <%} %></td>
           <td><%if(rt.getWeekOfDate().equals("5")){ %>
          	 今天
          	 <%}else if(rt.getWeekOfDate().equals("4")){ %>
          	 明天
          	 <%}else{ %>
          	 周五
          	 <%} %></td>
           <td><%if(rt.getWeekOfDate().equals("6")){ %>
          	 今天
          	 <%}else if(rt.getWeekOfDate().equals("5")){ %>
          	 明天
          	 <%}else{ %>
          	 周六
          	 <%} %>
           </td>
           <td><%if(rt.getWeekOfDate().equals("7")){ %>
          	 今天
          	 <%}else if(rt.getWeekOfDate().equals("6")){ %>
          	 明天
          	 <%}else{ %>
          	 周日
          	 <%} %></td>
           
           
       </tr>
       
       <tbody>
       <% String one = (String)request.getAttribute("one"); %>
        <% List<hospital_doctor> l =(List) request.getAttribute("date"); %>
        <% if (l!=null){ %>
      <%  for(hospital_doctor e:l){ %>
        	  <tr>
        	  <td><%if(one.indexOf("1")!=-1){ %>
        	  	<button onclick="location.href='/hospital_system/guahoController?ysid=<%=e.getYsid()+"&work="+1 %>'">出诊</button>
        	  	<%} %>
        	  </td>
        	  <td><%if(one.indexOf("2")!=-1){ %>
        	  	<button onclick="location.href='/hospital_system/guahoController?ysid=<%=e.getYsid()+"&work="+2 %>'">出诊</button>
        	  	<%} %>
        	  </td>
        	  <td><%if(one.indexOf("3")!=-1){ %>
        	  	<button onclick="location.href='/hospital_system/guahoController?ysid=<%=e.getYsid()+"&work="+3 %>'">出诊</button>
        	  	<%} %>
        	  </td>
        	  <td><%if(one.indexOf("4")!=-1){ %>
        	  	<button onclick="location.href='/hospital_system/guahoController?ysid=<%=e.getYsid()+"&work="+4 %>'">出诊</button>
        	  	<%} %>
        	  </td>
        	  <td><%if(one.indexOf("5")!=-1){ %>
        	  	<button onclick="location.href='/hospital_system/guahoController?ysid=<%=e.getYsid()+"&work="+5 %>'">出诊</button>
        	  	<%} %>
        	  </td>
        	  <td><%if(one.indexOf("6")!=-1){ %>
        	  	<button onclick="location.href='/hospital_system/guahoController?ysid=<%=e.getYsid()+"&work="+6 %>'">出诊</button>
        	  	<%} %>
        	  </td>
        	  <td>休息</td>
        	  
        	  </tr>
        	  
        	  
         <% } %>
         <% } %>
       </tbody>
       
       
     </table>
</body>
</html>